home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / pref / nsIPrefLocalizedString.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-05-08  |  5.6 KB  |  168 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIPrefLocalizedString.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIPrefLocalizedString_h__
  6. #define __gen_nsIPrefLocalizedString_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17.  
  18. /* starting interface:    nsIPrefLocalizedString */
  19. #define NS_IPREFLOCALIZEDSTRING_IID_STR "ae419e24-1dd1-11b2-b39a-d3e5e7073802"
  20.  
  21. #define NS_IPREFLOCALIZEDSTRING_IID \
  22.   {0xae419e24, 0x1dd1, 0x11b2, \
  23.     { 0xb3, 0x9a, 0xd3, 0xe5, 0xe7, 0x07, 0x38, 0x02 }}
  24.  
  25. /**
  26.  * The nsIPrefLocalizedString interface is simply a wrapper interface for
  27.  * nsISupportsString so the preferences service can have a unique identifier
  28.  * to distinguish between requests for normal wide strings (nsISupportsString)
  29.  * and "localized" wide strings, which get their default values from properites
  30.  * files.
  31.  *
  32.  * @see nsIPrefBranch
  33.  * @see nsISupportsString
  34.  * 
  35.  * @status FROZEN
  36.  */
  37. class NS_NO_VTABLE nsIPrefLocalizedString : public nsISupports {
  38.  public: 
  39.  
  40.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPREFLOCALIZEDSTRING_IID)
  41.  
  42.   /**
  43.    * Provides access to string data stored in this property.
  44.    *
  45.    * @return NS_OK The operation succeeded.
  46.    * @return Other An error occured.
  47.    */
  48.   /* attribute wstring data; */
  49.   NS_IMETHOD GetData(PRUnichar * *aData) = 0;
  50.   NS_IMETHOD SetData(const PRUnichar * aData) = 0;
  51.  
  52.   /**
  53.    * Used to retrieve the contents of this object into a wide string.
  54.    *
  55.    * @return wstring The string containing the data stored within this object.
  56.    */
  57.   /* wstring toString (); */
  58.   NS_IMETHOD ToString(PRUnichar **_retval) = 0;
  59.  
  60.   /**
  61.    * Used to set the contents of this object.
  62.    *
  63.    * @param length The length of the string. This value should not include
  64.    *               space for the null terminator, nor should it account for the
  65.    *               size of a character. It should  only be the number of
  66.    *               characters for which there is space in the string.
  67.    * @param data   The string data to be stored.
  68.    *
  69.    * @note
  70.    * This makes a copy of the string argument passed in.
  71.    *
  72.    * @return NS_OK The data was successfully stored.
  73.    */
  74.   /* void setDataWithLength (in unsigned long length, [size_is (length)] in wstring data); */
  75.   NS_IMETHOD SetDataWithLength(PRUint32 length, const PRUnichar *data) = 0;
  76.  
  77. };
  78.  
  79. /* Use this macro when declaring classes that implement this interface. */
  80. #define NS_DECL_NSIPREFLOCALIZEDSTRING \
  81.   NS_IMETHOD GetData(PRUnichar * *aData); \
  82.   NS_IMETHOD SetData(const PRUnichar * aData); \
  83.   NS_IMETHOD ToString(PRUnichar **_retval); \
  84.   NS_IMETHOD SetDataWithLength(PRUint32 length, const PRUnichar *data); 
  85.  
  86. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  87. #define NS_FORWARD_NSIPREFLOCALIZEDSTRING(_to) \
  88.   NS_IMETHOD GetData(PRUnichar * *aData) { return _to GetData(aData); } \
  89.   NS_IMETHOD SetData(const PRUnichar * aData) { return _to SetData(aData); } \
  90.   NS_IMETHOD ToString(PRUnichar **_retval) { return _to ToString(_retval); } \
  91.   NS_IMETHOD SetDataWithLength(PRUint32 length, const PRUnichar *data) { return _to SetDataWithLength(length, data); } 
  92.  
  93. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  94. #define NS_FORWARD_SAFE_NSIPREFLOCALIZEDSTRING(_to) \
  95.   NS_IMETHOD GetData(PRUnichar * *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \
  96.   NS_IMETHOD SetData(const PRUnichar * aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \
  97.   NS_IMETHOD ToString(PRUnichar **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); } \
  98.   NS_IMETHOD SetDataWithLength(PRUint32 length, const PRUnichar *data) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDataWithLength(length, data); } 
  99.  
  100. #if 0
  101. /* Use the code below as a template for the implementation class for this interface. */
  102.  
  103. /* Header file */
  104. class nsPrefLocalizedString : public nsIPrefLocalizedString
  105. {
  106. public:
  107.   NS_DECL_ISUPPORTS
  108.   NS_DECL_NSIPREFLOCALIZEDSTRING
  109.  
  110.   nsPrefLocalizedString();
  111.  
  112. private:
  113.   ~nsPrefLocalizedString();
  114.  
  115. protected:
  116.   /* additional members */
  117. };
  118.  
  119. /* Implementation file */
  120. NS_IMPL_ISUPPORTS1(nsPrefLocalizedString, nsIPrefLocalizedString)
  121.  
  122. nsPrefLocalizedString::nsPrefLocalizedString()
  123. {
  124.   /* member initializers and constructor code */
  125. }
  126.  
  127. nsPrefLocalizedString::~nsPrefLocalizedString()
  128. {
  129.   /* destructor code */
  130. }
  131.  
  132. /* attribute wstring data; */
  133. NS_IMETHODIMP nsPrefLocalizedString::GetData(PRUnichar * *aData)
  134. {
  135.     return NS_ERROR_NOT_IMPLEMENTED;
  136. }
  137. NS_IMETHODIMP nsPrefLocalizedString::SetData(const PRUnichar * aData)
  138. {
  139.     return NS_ERROR_NOT_IMPLEMENTED;
  140. }
  141.  
  142. /* wstring toString (); */
  143. NS_IMETHODIMP nsPrefLocalizedString::ToString(PRUnichar **_retval)
  144. {
  145.     return NS_ERROR_NOT_IMPLEMENTED;
  146. }
  147.  
  148. /* void setDataWithLength (in unsigned long length, [size_is (length)] in wstring data); */
  149. NS_IMETHODIMP nsPrefLocalizedString::SetDataWithLength(PRUint32 length, const PRUnichar *data)
  150. {
  151.     return NS_ERROR_NOT_IMPLEMENTED;
  152. }
  153.  
  154. /* End of implementation class template. */
  155. #endif
  156.  
  157. #define NS_PREFLOCALIZEDSTRING_CID                     \
  158.   { /* {064d9cee-1dd2-11b2-83e3-d25ab0193c26} */       \
  159.     0x064d9cee,                                        \
  160.     0x1dd2,                                            \
  161.     0x11b2,                                            \
  162.     { 0x83, 0xe3, 0xd2, 0x5a, 0xb0, 0x19, 0x3c, 0x26 } \
  163.   }
  164. #define NS_PREFLOCALIZEDSTRING_CONTRACTID "@mozilla.org/pref-localizedstring;1"
  165. #define NS_PREFLOCALIZEDSTRING_CLASSNAME "Pref LocalizedString"
  166.  
  167. #endif /* __gen_nsIPrefLocalizedString_h__ */
  168.